3.110 \(\int \frac{\csc ^2(c+d x)}{(a+b \sin ^2(c+d x))^3} \, dx\)

Optimal. Leaf size=196 \[ -\frac{3 b \left (8 a^2+12 a b+5 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (c+d x)}{\sqrt{a}}\right )}{8 a^{7/2} d (a+b)^{5/2}}-\frac{(2 a+3 b) (4 a+5 b) \cot (c+d x)}{8 a^3 d (a+b)^2}+\frac{b \cot (c+d x) \left ((4 a+b) \tan ^2(c+d x)+4 a+5 b\right )}{8 a^2 d (a+b)^2 \left ((a+b) \tan ^2(c+d x)+a\right )}+\frac{b \csc (c+d x) \sec ^3(c+d x)}{4 a d (a+b) \left ((a+b) \tan ^2(c+d x)+a\right )^2} \]

[Out]

(-3*b*(8*a^2 + 12*a*b + 5*b^2)*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[a]])/(8*a^(7/2)*(a + b)^(5/2)*d) - ((2*a
 + 3*b)*(4*a + 5*b)*Cot[c + d*x])/(8*a^3*(a + b)^2*d) + (b*Csc[c + d*x]*Sec[c + d*x]^3)/(4*a*(a + b)*d*(a + (a
 + b)*Tan[c + d*x]^2)^2) + (b*Cot[c + d*x]*(4*a + 5*b + (4*a + b)*Tan[c + d*x]^2))/(8*a^2*(a + b)^2*d*(a + (a
+ b)*Tan[c + d*x]^2))

________________________________________________________________________________________

Rubi [A]  time = 0.254987, antiderivative size = 196, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.217, Rules used = {3187, 468, 577, 453, 205} \[ -\frac{3 b \left (8 a^2+12 a b+5 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (c+d x)}{\sqrt{a}}\right )}{8 a^{7/2} d (a+b)^{5/2}}-\frac{(2 a+3 b) (4 a+5 b) \cot (c+d x)}{8 a^3 d (a+b)^2}+\frac{b \cot (c+d x) \left ((4 a+b) \tan ^2(c+d x)+4 a+5 b\right )}{8 a^2 d (a+b)^2 \left ((a+b) \tan ^2(c+d x)+a\right )}+\frac{b \csc (c+d x) \sec ^3(c+d x)}{4 a d (a+b) \left ((a+b) \tan ^2(c+d x)+a\right )^2} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]^2/(a + b*Sin[c + d*x]^2)^3,x]

[Out]

(-3*b*(8*a^2 + 12*a*b + 5*b^2)*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[a]])/(8*a^(7/2)*(a + b)^(5/2)*d) - ((2*a
 + 3*b)*(4*a + 5*b)*Cot[c + d*x])/(8*a^3*(a + b)^2*d) + (b*Csc[c + d*x]*Sec[c + d*x]^3)/(4*a*(a + b)*d*(a + (a
 + b)*Tan[c + d*x]^2)^2) + (b*Cot[c + d*x]*(4*a + 5*b + (4*a + b)*Tan[c + d*x]^2))/(8*a^2*(a + b)^2*d*(a + (a
+ b)*Tan[c + d*x]^2))

Rule 3187

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff^(m + 1)/f, Subst[Int[(x^m*(a + (a + b)*ff^2*x^2)^p)/(1 + ff^2*x^2)^(m/2 + p
+ 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rule 468

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> -Simp[((c*b -
 a*d)*(e*x)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q - 1))/(a*b*e*n*(p + 1)), x] + Dist[1/(a*b*n*(p + 1)), I
nt[(e*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q - 2)*Simp[c*(c*b*n*(p + 1) + (c*b - a*d)*(m + 1)) + d*(c*b*n*(p
+ 1) + (c*b - a*d)*(m + n*(q - 1) + 1))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[n, 0] && LtQ[p, -1] && GtQ[q, 1] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 577

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
x_Symbol] :> -Simp[((b*e - a*f)*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*(c + d*x^n)^q)/(a*b*g*n*(p + 1)), x] + Dist[
1/(a*b*n*(p + 1)), Int[(g*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q - 1)*Simp[c*(b*e*n*(p + 1) + (b*e - a*f)*(m
+ 1)) + d*(b*e*n*(p + 1) + (b*e - a*f)*(m + n*q + 1))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] &&
 IGtQ[n, 0] && LtQ[p, -1] && GtQ[q, 0] &&  !(EqQ[q, 1] && SimplerQ[b*c - a*d, b*e - a*f])

Rule 453

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(c*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(a*e*(m + 1)), x] + Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(a*e^n*(m + 1)), In
t[(e*x)^(m + n)*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && (IntegerQ[n] ||
GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1])) &&  !ILtQ[p, -1]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\csc ^2(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^3} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (1+x^2\right )^3}{x^2 \left (a+(a+b) x^2\right )^3} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac{b \csc (c+d x) \sec ^3(c+d x)}{4 a (a+b) d \left (a+(a+b) \tan ^2(c+d x)\right )^2}-\frac{\operatorname{Subst}\left (\int \frac{\left (1+x^2\right ) \left (-4 a-5 b+(-4 a-b) x^2\right )}{x^2 \left (a+(a+b) x^2\right )^2} \, dx,x,\tan (c+d x)\right )}{4 a (a+b) d}\\ &=\frac{b \csc (c+d x) \sec ^3(c+d x)}{4 a (a+b) d \left (a+(a+b) \tan ^2(c+d x)\right )^2}+\frac{b \cot (c+d x) \left (4 a+5 b+(4 a+b) \tan ^2(c+d x)\right )}{8 a^2 (a+b)^2 d \left (a+(a+b) \tan ^2(c+d x)\right )}+\frac{\operatorname{Subst}\left (\int \frac{(2 a+3 b) (4 a+5 b)+(2 a+b) (4 a+b) x^2}{x^2 \left (a+(a+b) x^2\right )} \, dx,x,\tan (c+d x)\right )}{8 a^2 (a+b)^2 d}\\ &=-\frac{(2 a+3 b) (4 a+5 b) \cot (c+d x)}{8 a^3 (a+b)^2 d}+\frac{b \csc (c+d x) \sec ^3(c+d x)}{4 a (a+b) d \left (a+(a+b) \tan ^2(c+d x)\right )^2}+\frac{b \cot (c+d x) \left (4 a+5 b+(4 a+b) \tan ^2(c+d x)\right )}{8 a^2 (a+b)^2 d \left (a+(a+b) \tan ^2(c+d x)\right )}-\frac{\left (3 b \left (8 a^2+12 a b+5 b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+(a+b) x^2} \, dx,x,\tan (c+d x)\right )}{8 a^3 (a+b)^2 d}\\ &=-\frac{3 b \left (8 a^2+12 a b+5 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (c+d x)}{\sqrt{a}}\right )}{8 a^{7/2} (a+b)^{5/2} d}-\frac{(2 a+3 b) (4 a+5 b) \cot (c+d x)}{8 a^3 (a+b)^2 d}+\frac{b \csc (c+d x) \sec ^3(c+d x)}{4 a (a+b) d \left (a+(a+b) \tan ^2(c+d x)\right )^2}+\frac{b \cot (c+d x) \left (4 a+5 b+(4 a+b) \tan ^2(c+d x)\right )}{8 a^2 (a+b)^2 d \left (a+(a+b) \tan ^2(c+d x)\right )}\\ \end{align*}

Mathematica [A]  time = 1.70502, size = 214, normalized size = 1.09 \[ \frac{\csc ^6(c+d x) (-2 a+b \cos (2 (c+d x))-b) \left (\frac{4 a^{3/2} b^2 \sin (2 (c+d x))}{a+b}+\frac{3 b \left (8 a^2+12 a b+5 b^2\right ) (2 a-b \cos (2 (c+d x))+b)^2 \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (c+d x)}{\sqrt{a}}\right )}{(a+b)^{5/2}}+\frac{\sqrt{a} b^2 (10 a+7 b) \sin (2 (c+d x)) (2 a-b \cos (2 (c+d x))+b)}{(a+b)^2}+8 \sqrt{a} \cot (c+d x) (2 a-b \cos (2 (c+d x))+b)^2\right )}{64 a^{7/2} d \left (a \csc ^2(c+d x)+b\right )^3} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]^2/(a + b*Sin[c + d*x]^2)^3,x]

[Out]

((-2*a - b + b*Cos[2*(c + d*x)])*Csc[c + d*x]^6*((3*b*(8*a^2 + 12*a*b + 5*b^2)*ArcTan[(Sqrt[a + b]*Tan[c + d*x
])/Sqrt[a]]*(2*a + b - b*Cos[2*(c + d*x)])^2)/(a + b)^(5/2) + 8*Sqrt[a]*(2*a + b - b*Cos[2*(c + d*x)])^2*Cot[c
 + d*x] + (4*a^(3/2)*b^2*Sin[2*(c + d*x)])/(a + b) + (Sqrt[a]*b^2*(10*a + 7*b)*(2*a + b - b*Cos[2*(c + d*x)])*
Sin[2*(c + d*x)])/(a + b)^2))/(64*a^(7/2)*d*(b + a*Csc[c + d*x]^2)^3)

________________________________________________________________________________________

Maple [B]  time = 0.13, size = 367, normalized size = 1.9 \begin{align*} -{\frac{3\,{b}^{2} \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{2\,d \left ( a \left ( \tan \left ( dx+c \right ) \right ) ^{2}+ \left ( \tan \left ( dx+c \right ) \right ) ^{2}b+a \right ) ^{2}{a}^{2} \left ( a+b \right ) }}-{\frac{7\,{b}^{3} \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{8\,d{a}^{3} \left ( a \left ( \tan \left ( dx+c \right ) \right ) ^{2}+ \left ( \tan \left ( dx+c \right ) \right ) ^{2}b+a \right ) ^{2} \left ( a+b \right ) }}-{\frac{3\,{b}^{2}\tan \left ( dx+c \right ) }{2\,d \left ( a \left ( \tan \left ( dx+c \right ) \right ) ^{2}+ \left ( \tan \left ( dx+c \right ) \right ) ^{2}b+a \right ) ^{2}a \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}-{\frac{9\,{b}^{3}\tan \left ( dx+c \right ) }{8\,d \left ( a \left ( \tan \left ( dx+c \right ) \right ) ^{2}+ \left ( \tan \left ( dx+c \right ) \right ) ^{2}b+a \right ) ^{2}{a}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}-3\,{\frac{b}{d \left ({a}^{2}+2\,ab+{b}^{2} \right ) a\sqrt{a \left ( a+b \right ) }}\arctan \left ({\frac{ \left ( a+b \right ) \tan \left ( dx+c \right ) }{\sqrt{a \left ( a+b \right ) }}} \right ) }-{\frac{9\,{b}^{2}}{2\,{a}^{2}d \left ({a}^{2}+2\,ab+{b}^{2} \right ) }\arctan \left ({ \left ( a+b \right ) \tan \left ( dx+c \right ){\frac{1}{\sqrt{a \left ( a+b \right ) }}}} \right ){\frac{1}{\sqrt{a \left ( a+b \right ) }}}}-{\frac{15\,{b}^{3}}{8\,d{a}^{3} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }\arctan \left ({ \left ( a+b \right ) \tan \left ( dx+c \right ){\frac{1}{\sqrt{a \left ( a+b \right ) }}}} \right ){\frac{1}{\sqrt{a \left ( a+b \right ) }}}}-{\frac{1}{d{a}^{3}\tan \left ( dx+c \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)^2/(a+sin(d*x+c)^2*b)^3,x)

[Out]

-3/2/d/(a*tan(d*x+c)^2+tan(d*x+c)^2*b+a)^2/a^2*b^2/(a+b)*tan(d*x+c)^3-7/8/d*b^3/a^3/(a*tan(d*x+c)^2+tan(d*x+c)
^2*b+a)^2/(a+b)*tan(d*x+c)^3-3/2/d/(a*tan(d*x+c)^2+tan(d*x+c)^2*b+a)^2*b^2/a/(a^2+2*a*b+b^2)*tan(d*x+c)-9/8/d*
b^3/a^2/(a*tan(d*x+c)^2+tan(d*x+c)^2*b+a)^2/(a^2+2*a*b+b^2)*tan(d*x+c)-3/d/(a^2+2*a*b+b^2)/a/(a*(a+b))^(1/2)*a
rctan((a+b)*tan(d*x+c)/(a*(a+b))^(1/2))*b-9/2/d/a^2/(a^2+2*a*b+b^2)/(a*(a+b))^(1/2)*arctan((a+b)*tan(d*x+c)/(a
*(a+b))^(1/2))*b^2-15/8/d*b^3/a^3/(a^2+2*a*b+b^2)/(a*(a+b))^(1/2)*arctan((a+b)*tan(d*x+c)/(a*(a+b))^(1/2))-1/d
/a^3/tan(d*x+c)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2/(a+b*sin(d*x+c)^2)^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.24403, size = 2275, normalized size = 11.61 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2/(a+b*sin(d*x+c)^2)^3,x, algorithm="fricas")

[Out]

[-1/32*(4*(8*a^4*b^2 + 34*a^3*b^3 + 41*a^2*b^4 + 15*a*b^5)*cos(d*x + c)^5 - 4*(16*a^5*b + 76*a^4*b^2 + 137*a^3
*b^3 + 107*a^2*b^4 + 30*a*b^5)*cos(d*x + c)^3 + 3*(8*a^4*b + 28*a^3*b^2 + 37*a^2*b^3 + 22*a*b^4 + 5*b^5 + (8*a
^2*b^3 + 12*a*b^4 + 5*b^5)*cos(d*x + c)^4 - 2*(8*a^3*b^2 + 20*a^2*b^3 + 17*a*b^4 + 5*b^5)*cos(d*x + c)^2)*sqrt
(-a^2 - a*b)*log(((8*a^2 + 8*a*b + b^2)*cos(d*x + c)^4 - 2*(4*a^2 + 5*a*b + b^2)*cos(d*x + c)^2 - 4*((2*a + b)
*cos(d*x + c)^3 - (a + b)*cos(d*x + c))*sqrt(-a^2 - a*b)*sin(d*x + c) + a^2 + 2*a*b + b^2)/(b^2*cos(d*x + c)^4
 - 2*(a*b + b^2)*cos(d*x + c)^2 + a^2 + 2*a*b + b^2))*sin(d*x + c) + 4*(8*a^6 + 40*a^5*b + 92*a^4*b^2 + 111*a^
3*b^3 + 66*a^2*b^4 + 15*a*b^5)*cos(d*x + c))/(((a^7*b^2 + 3*a^6*b^3 + 3*a^5*b^4 + a^4*b^5)*d*cos(d*x + c)^4 -
2*(a^8*b + 4*a^7*b^2 + 6*a^6*b^3 + 4*a^5*b^4 + a^4*b^5)*d*cos(d*x + c)^2 + (a^9 + 5*a^8*b + 10*a^7*b^2 + 10*a^
6*b^3 + 5*a^5*b^4 + a^4*b^5)*d)*sin(d*x + c)), -1/16*(2*(8*a^4*b^2 + 34*a^3*b^3 + 41*a^2*b^4 + 15*a*b^5)*cos(d
*x + c)^5 - 2*(16*a^5*b + 76*a^4*b^2 + 137*a^3*b^3 + 107*a^2*b^4 + 30*a*b^5)*cos(d*x + c)^3 - 3*(8*a^4*b + 28*
a^3*b^2 + 37*a^2*b^3 + 22*a*b^4 + 5*b^5 + (8*a^2*b^3 + 12*a*b^4 + 5*b^5)*cos(d*x + c)^4 - 2*(8*a^3*b^2 + 20*a^
2*b^3 + 17*a*b^4 + 5*b^5)*cos(d*x + c)^2)*sqrt(a^2 + a*b)*arctan(1/2*((2*a + b)*cos(d*x + c)^2 - a - b)/(sqrt(
a^2 + a*b)*cos(d*x + c)*sin(d*x + c)))*sin(d*x + c) + 2*(8*a^6 + 40*a^5*b + 92*a^4*b^2 + 111*a^3*b^3 + 66*a^2*
b^4 + 15*a*b^5)*cos(d*x + c))/(((a^7*b^2 + 3*a^6*b^3 + 3*a^5*b^4 + a^4*b^5)*d*cos(d*x + c)^4 - 2*(a^8*b + 4*a^
7*b^2 + 6*a^6*b^3 + 4*a^5*b^4 + a^4*b^5)*d*cos(d*x + c)^2 + (a^9 + 5*a^8*b + 10*a^7*b^2 + 10*a^6*b^3 + 5*a^5*b
^4 + a^4*b^5)*d)*sin(d*x + c))]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)**2/(a+b*sin(d*x+c)**2)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.18756, size = 313, normalized size = 1.6 \begin{align*} -\frac{\frac{3 \,{\left (8 \, a^{2} b + 12 \, a b^{2} + 5 \, b^{3}\right )}{\left (\pi \left \lfloor \frac{d x + c}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac{a \tan \left (d x + c\right ) + b \tan \left (d x + c\right )}{\sqrt{a^{2} + a b}}\right )\right )}}{{\left (a^{5} + 2 \, a^{4} b + a^{3} b^{2}\right )} \sqrt{a^{2} + a b}} + \frac{12 \, a^{2} b^{2} \tan \left (d x + c\right )^{3} + 19 \, a b^{3} \tan \left (d x + c\right )^{3} + 7 \, b^{4} \tan \left (d x + c\right )^{3} + 12 \, a^{2} b^{2} \tan \left (d x + c\right ) + 9 \, a b^{3} \tan \left (d x + c\right )}{{\left (a^{5} + 2 \, a^{4} b + a^{3} b^{2}\right )}{\left (a \tan \left (d x + c\right )^{2} + b \tan \left (d x + c\right )^{2} + a\right )}^{2}} + \frac{8}{a^{3} \tan \left (d x + c\right )}}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)^2/(a+b*sin(d*x+c)^2)^3,x, algorithm="giac")

[Out]

-1/8*(3*(8*a^2*b + 12*a*b^2 + 5*b^3)*(pi*floor((d*x + c)/pi + 1/2)*sgn(2*a + 2*b) + arctan((a*tan(d*x + c) + b
*tan(d*x + c))/sqrt(a^2 + a*b)))/((a^5 + 2*a^4*b + a^3*b^2)*sqrt(a^2 + a*b)) + (12*a^2*b^2*tan(d*x + c)^3 + 19
*a*b^3*tan(d*x + c)^3 + 7*b^4*tan(d*x + c)^3 + 12*a^2*b^2*tan(d*x + c) + 9*a*b^3*tan(d*x + c))/((a^5 + 2*a^4*b
 + a^3*b^2)*(a*tan(d*x + c)^2 + b*tan(d*x + c)^2 + a)^2) + 8/(a^3*tan(d*x + c)))/d